package strategy.pay;

public abstract class Payment {
    public abstract String getName();
    public abstract double getBalance(String uid);

    public MsgResult pay(String uid,double amount){
        double balance = getBalance(uid);
        if (balance>amount){
            return new MsgResult("200","支付成功","支付金额"+amount);
        }
        return new MsgResult("500","支付失败","余额不足");
    }
}
